package com.kaede.hayate.modules.sys.entity;

import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.kaede.hayate.common.base.BaseEntity;

/**
 * <p>
 * 用户
 * </p>
 *
 * @author Kaede
 * @since 2018-06-06
 */
@TableName("sys_user")
public class User extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 用户名
     */
    private String username;
    /**
     * 密码
     */
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private String password;
    /**
     * token_secret
     */
    @JsonIgnore
    @TableField("token_secret")
    private String tokenSecret;
    /**
     * 姓名
     */
    private String name;
    /**
     * 性别
     */
    private Integer sex;
    /**
     * 生日
     */
    @JsonFormat(pattern="yyyy-MM-dd")
    private Date birthday;
    /**
     * 封停标记
     */
    @TableField("ban_flag")
    private Boolean banFlag;
    /**
     * 手机号
     */
    private String mobile;
    /**
     * 邮箱
     */
    private String email;


    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getTokenSecret() {
        return tokenSecret;
    }

    public void setTokenSecret(String tokenSecret) {
        this.tokenSecret = tokenSecret;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public Boolean getBanFlag() {
        return banFlag;
    }

    public void setBanFlag(Boolean banFlag) {
        this.banFlag = banFlag;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Override
    public String toString() {
        return "User{" +
        "username=" + username +
        ", password=" + password +
        ", tokenSecret=" + tokenSecret +
        ", name=" + name +
        ", sex=" + sex +
        ", birthday=" + birthday +
        ", banFlag=" + banFlag +
        ", mobile=" + mobile +
        ", email=" + email +
        "}";
    }
}
